//
//  MSMytradeTableVC.m
//  SocietySale
//
//  Created by yumingwei on 2016/11/26.
//  Copyright © 2016年 Mike. All rights reserved.
//

#import "MSMytradeTableVC.h"
#import "MSMytradeCell.h"

@interface MSMytradeTableVC ()

@end

@implementation MSMytradeTableVC

//- (void)setIsSale:(BOOL)isSale{
//    _isSale = isSale;
//}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *cellId = @"cellId";
    MSMytradeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!cell) {
        cell = [[MSMytradeCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    cell.delegate = (id)self.delegate;
    cell.isSale = self.isSale;
    cell.model = self.dataArray[indexPath.row];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return [MSMytradeCell cellHeightWithModel:self.dataArray[indexPath.row]];
}

@end
